package com.googlecode.ocl2sqlcompiler;

/**
 * @author Renato Miceli
 */
public class OCLSemanticObject<T> {

	public OCLType type;

	public T value;
	
	public OCLSemanticObject<?> expr;
	
	public String code;

	public OCLSemanticObject(OCLSemanticObject<T> obj) {
		this.type = obj.type;
		this.value = obj.value;
		this.expr = obj.expr;
		this.code = obj.code;
	}

	public OCLSemanticObject(OCLType type, T value) {
		this.type = type;
		this.value = value;
		this.expr = null;
		this.code = "";
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		return type.toString() + ", " + value;
	}

}
